package com.bdqn.t320.pojo;

import java.io.Serializable;
import java.util.List;

public class Page implements Serializable {
    //当前页数
    private int currentPage = 1;

    //每页显示的大小
    private int pageSize = 5;

    //总页数
    private int totalPage;

    //总记录数
    private int totalRecord;

    //当前要显示的数据
    private List<SysUser> list;

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalRecord() {
        return totalRecord;
    }

    public void setTotalRecord(int totalRecord) {
        this.totalRecord = totalRecord;
        totalPage = totalRecord % pageSize == 0 ? totalRecord / pageSize : (totalRecord / pageSize) + 1;
    }

    public List<SysUser> getList() {
        return list;
    }

    public void setList(List<SysUser> list) {
        this.list = list;
    }
}
